SELECT CONVERT(CHAR(10), CURRENT_TIMESTAMP, 23) + ' ' + RIGHT('0' + LTRIM(RIGHT(CONVERT(CHAR(20), CURRENT_TIMESTAMP, 22), 11)), 11);. See the Date and Time ... ... <看更多>
Search
Search
SELECT CONVERT(CHAR(10), CURRENT_TIMESTAMP, 23) + ' ' + RIGHT('0' + LTRIM(RIGHT(CONVERT(CHAR(20), CURRENT_TIMESTAMP, 22), 11)), 11);. See the Date and Time ... ... <看更多>
Formatting a Date in SQL Server http://www.ReportingGuru.com Email us at [email protected] if you ... ... <看更多>
On version 2012 or higher you can use the format function to get just year and month, then cast it as an int. On versions prior to 2012 you can do the ... ... <看更多>